CREATE TABLE [dbo].[DnnProduct_VendorClassification]
(
[VendorClassificationId] [int] NOT NULL IDENTITY(1, 1),
[VendorId] [int] NOT NULL,
[ClassificationId] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_VendorClassification] ADD CONSTRAINT [PK_DnnProduct_VendorClassification] PRIMARY KEY CLUSTERED  ([VendorClassificationId]) WITH (FILLFACTOR=85) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_VendorClassification] ADD CONSTRAINT [IX_DnnProduct_VendorClassification] UNIQUE NONCLUSTERED  ([VendorId], [ClassificationId]) WITH (FILLFACTOR=85) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_DnnProduct_VendorClassification_1] ON [dbo].[DnnProduct_VendorClassification] ([ClassificationId]) WITH (FILLFACTOR=85) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DnnProduct_VendorClassification] WITH NOCHECK ADD CONSTRAINT [FK_DnnProduct_VendorClassification_DnnProduct_Classification] FOREIGN KEY ([ClassificationId]) REFERENCES [dbo].[DnnProduct_Classification] ([ClassificationId]) ON DELETE CASCADE NOT FOR REPLICATION
GO
ALTER TABLE [dbo].[DnnProduct_VendorClassification] WITH NOCHECK ADD CONSTRAINT [FK_DnnProduct_VendorClassification_DnnProduct_Vendors] FOREIGN KEY ([VendorId]) REFERENCES [dbo].[DnnProduct_Vendors] ([VendorId]) ON DELETE CASCADE NOT FOR REPLICATION
GO
